home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act3 / 00276_checkit.ls < prev    next >
Encoding:
Text File  |  1995-03-28  |  2.2 KB  |  91 lines

  1. on checkit
  2.   global WhichBug, bugnumber, changer, type, exitFrame, returnframe, singit, isaid, game3level, TRIAL
  3.   set isaid to 1
  4.   set returnframe to the frame
  5.   set singit to 0
  6.   set golem to getAt(bugnumber, WhichBug)
  7.   if changer = golem then
  8.     set TRIAL to 0
  9.     if the soundLevel then
  10.       puppetSound("cor" & random(3))
  11.       repeat while not (the soundBusy of 1)
  12.         updateStage()
  13.       end repeat
  14.       repeat while the soundBusy of 1
  15.         updateStage()
  16.       end repeat
  17.     end if
  18.     clearcounter()
  19.     set TRIAL to 0
  20.     updateStage()
  21.     set WhichBug to WhichBug + 1
  22.     if game3level = 1 then
  23.       if WhichBug > 2 then
  24.         prepreward()
  25.         go("reward" & random(5))
  26.         exit
  27.       end if
  28.     end if
  29.     if game3level = 2 then
  30.       if WhichBug > 4 then
  31.         prepreward()
  32.         go("reward" & random(5))
  33.         exit
  34.       end if
  35.     end if
  36.     if game3level = 3 then
  37.       if WhichBug > 6 then
  38.         prepreward()
  39.         go("reward" & random(5))
  40.         exit
  41.       end if
  42.     end if
  43.     set changer to EMPTY
  44.   else
  45.     dohint()
  46.     set the castNum of sprite (42 + WhichBug) to getAt(digitalis, 14)
  47.   end if
  48.   go("levela" & game3level)
  49. end
  50.  
  51. on flashanswer
  52.   global WhichBug, digitalis, bugnumber
  53.   set digits to 42 + WhichBug
  54.   set golem to string(getAt(bugnumber, WhichBug))
  55.   set stp1 to the castNum of sprite digits
  56.   repeat with xxx = 1 to 4
  57.     set the castNum of sprite digits to getAt(digitalis, value(golem) + 29)
  58.     updateStage()
  59.     startTimer()
  60.     repeat while the timer < 20
  61.       updateStage()
  62.     end repeat
  63.     set the castNum of sprite digits to getAt(digitalis, 12)
  64.     updateStage()
  65.     startTimer()
  66.     repeat while the timer < 20
  67.       updateStage()
  68.     end repeat
  69.   end repeat
  70.   set the castNum of sprite digits to getAt(digitalis, 12)
  71.   updateStage()
  72. end
  73.  
  74. on stopMovie
  75.   repeat with xxx = 1 to 48
  76.     set the visible of sprite xxx to 1
  77.   end repeat
  78. end
  79.  
  80. on bugmenu
  81.   global buglist, digitalis, game3level
  82.   set bugfirst to the number of cast "bug1" - 1
  83.   repeat with xxx = 1 to count(buglist) - 3
  84.     puppetSprite(36 + xxx, 1)
  85.     puppetSprite(42 + xxx, 1)
  86.     set the castNum of sprite (36 + xxx) to bugfirst + getAt(buglist, xxx)
  87.     set the castNum of sprite (42 + xxx) to getAt(digitalis, 13)
  88.   end repeat
  89.   updateStage()
  90. end
  91.